import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:moose_app/core/utils/navigate_util.dart';
import 'package:moose_app/ui/screens/login/login_screen.dart';
import 'package:moose_app/ui/widgets/already_a_user.dart';
import 'package:moose_app/ui/widgets/auth/auth_account_input.dart';
import 'package:moose_app/ui/widgets/auth/auth_button.dart';
import 'package:moose_app/ui/widgets/auth/auth_password_input.dart';
import 'package:moose_app/ui/widgets/auth/auth_send_sms_input.dart';

import 'or_divider.dart';
import 'register_background.dart';
import 'social_icons.dart';

class ATHRegisterBody extends StatelessWidget {
  final Widget child;

  const ATHRegisterBody({
    Key key,
    this.child,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ATHRegisterBackground(
      child: SingleChildScrollView(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Padding(
              padding: EdgeInsets.only(top: 100.h),
              child: Image.asset(
                'assets/images/register.png',
                height: 400.h,
              ),
            ),
            ATHAuthAccountInput(
              hintText: "账号",
              onChanged: (value) {},
            ),
            ATHAuthPasswordInput(
              hintText: "密码",
              onChanged: (value) {},
            ),
            ATHAuthSendSmsInput(
              hintText: "短信",
              onChanged: (value) {},
            ),
            ATHAuthButton(
              text: "注册",
              press: () {},
            ),
            ATHUserAlready(
              login: false,
              press: () {
                ATHNavigator.pushReplace(context, ATHLoginScreen.routeName);
              },
            ),
            ATHOrDivider(),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                ATHSocialIcon(
                  iconSrc: 'assets/icons/auth/wechat.svg',
                  press: () {},
                ),
                ATHSocialIcon(
                  iconSrc: 'assets/icons/auth/weibo.svg',
                  press: () {},
                ),
                ATHSocialIcon(
                  iconSrc: 'assets/icons/auth/taobao.svg',
                  press: () {},
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
